<!DOCTYPE html>
<html lang="zh">
<head>
    <title></title>
</head>
<style type="text/css" media="print">
    @page {
        size: landscape;
        margin: 0;
    }
    body  {
        margin:10px;
        font-size: 12px;
        font-weight:500;
    }
</style>
<body>

<div style="color:#000000;font-weight:600;font-size:15pt;text-align: center">送&nbsp;&nbsp;货&nbsp;&nbsp;单</div>
<table border="0" style="width:100%;">
    <tbody>
    <tr>
        <td>客 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;户：{if condition="isset($row.customer)"}{$row.customer.name}{/if}</td>
        <td>下单日期：{$row.order_date}</td>
    </tr>
    <tr>
        <td colspan="2">地 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;址：{if condition="isset($row.customer)"}{$row.customer.address}{$row.customer.address_detail}{/if}</td>
    </tr>
    <tr>
        <td>电 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;话：{if condition="isset($row.contacts)"}{$row.contacts.mobile}{/if}</td>
        <td>No.&nbsp;&nbsp;&nbsp;&nbsp;{$row.num}</td>
    </tr>
    </tbody>
</table>
<table border="1" cellspacing="0" style="width:100%;border:1px solid #000;text-align:center;color:#000000">
    <tbody>
    <tr>
        <td>序号</td>
        <td colspan="4">产品</td>
        <td>规格</td>
        <td>单位</td>
        <td>数量</td>
        <td>单价</td>
        <td>金额</td>
        <td>运费</td>
    </tr>
    {foreach name="row.product" item="val" key="k"}
    <tr>
        <td>{$k+1}</td>
        <td colspan="4">{$val.name}</td>
        <td>{$val.type}</td>
        <td>{$val.unit}</td>
        <td>{$val.number}</td>
        <td>{$val.price}</td>
        <td>{:$val['number']*$val['price']}</td>
        <td>{$val.freight}</td>
    </tr>
    {/foreach}
    <tr>

        <td colspan="6"></td>
        <td>{$row.total_number}</td>
        <td>总额：</td>
        <td>{$row.total_price}</td>
        <td colspan="3"></td>
    </tr>
    </tbody>
</table>
<table border="0" style="width:100%;">
    <tbody>
    <tr>
        <td>业务员：{$row.staff.name}</td>
        <td>制单：
        </td>
        <td>复核：
        </td>
        <td>客户签名：
        </td>
    </tr>
    <tr>
        <td colspan="2">发货仓库：{$row.warehouse.name}
        </td>
        <td colspan="2">{if condition="$row.online == '线上'"}发货店铺：{$row.shop.name}{/if}</td>
    </tr>
    <tr>
        <td colspan="4">备注：{$row.remarks}</td>
    </tr>
    </tbody>
</table>
<script type="text/javascript">
    {if condition="$script"}
    function print_page() {
        if (!!window.ActiveXObject || "ActiveXObject" in window) {
            remove_ie_header_and_footer();
        }
        {$script}
    }

    function remove_ie_header_and_footer() {
        var hkey_root, hkey_path, hkey_key;
        hkey_path = "HKEY_CURRENT_USER\\Software\\Microsoft\\Internet Explorer\\PageSetup\\";
        try {
            var RegWsh = new ActiveXObject("WScript.Shell");
            RegWsh.RegWrite(hkey_path + "header", "");
            RegWsh.RegWrite(hkey_path + "footer", "");
        } catch (e) {}
    }
    print_page();
    {/if}
</script>
</body>
</html>